package com.zj.common.status;

public enum PkError {

	Succeess("0000","000"),
	Less("2001","F11"),
	OutUser("2002","FA1"),
	NoUser("2003","FA1"),
	NoQy("2004","FA9"),
	Other("2099","EEE");
	
    private String key;
    private String value;

    private PkError(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static PkError parse(String key) {
    	PkError[] areas= PkError.values();
        for(PkError a:areas){
            if(a.getKey().equals(key)){
                return a;
            }
        }
        return null;
    }

    public static PkError parseValue(String value) {
    	PkError[] areas= PkError.values();
        for(PkError a:areas){
            if(a.getValue().equals(value)){
                return a;
            }
        }
        return null;
    }
}
